package com.bsbc.project.controller;

import com.bsbc.project.config.OperationAuth;
import com.bsbc.project.entity.Person;
import org.junit.Test;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.lang.reflect.Method;
import java.util.List;

@RestController
@RequestMapping("/member/testController")
public class TestController {


    @OperationAuth
    @PostMapping("/operationTest")
    public List<Person> operationTest(){
        //业务代码
        //数据库请求数据    用spring aop切带有 自定义注解的方法 处理数据库返回的数据
        List<Person> personList = MysqlController.getPersonList();
        return personList;
    }


    public List<Person> selectAllPerson(){
        return null;
    }


    @OperationAuth
    public void delPerson(Long personId){

    }

    @PostMapping("/test")
    public void testMethod(){
        this.operationTest();
    }





}
